<?php



function getTradeNo(){
  return  date('Ymd'). str_pad(mt_rand(0, 999999), 6, "0", STR_PAD_BOTH).substr(time(),-6);
}


function get_client_ip(){
    $cip = "unknown";
    if($_SERVER['REMOTE_ADDR']){
        $cip = $_SERVER['REMOTE_ADDR'];
    }elseif(getenv("REMOTE_ADDR")){
        $cip = getenv("REMOTE_ADDR");
    }
    return $cip;
}


